{include file="layout_basic.tpl"}
<form action="" method="post">
	<fieldset>
		<legend>{$ui.newtraducoes}</legend>
		<dl>
			<dt> <label>{$ui.key_value}</label> </dt>
			<dd> <input value="{$edit.key_value}" name="key_value" type="text" /> </dd>
		</dl>

		<dl>
			<dt> <label>{$ui.value}</label> </dt>
			<dd> <input value="{$edit.valor}" name="value" type="text" /> </dd>
		</dl>

		<dl>
			<dt> <label>{$ui.fkidioma}</label> </dt>
			<dd>
				<select name="idioma">
					{foreach from=$menuidiomas item=row}
						<option value="{$row.cod_idioma}" {if $row.cod_idioma == $edit.cod_idioma} selected="selected"{/if}>{$row.nome_idioma}</option>
					{/foreach}
				</select>
			</dd>
		</dl>
		<input type="submit" value="{$ui.saveaction}"/> 
	</fieldset>
</form>

<fieldset>
	<legend>{$ui.listtraducoes}</legend>
		<div class="widget_tableDiv">
			<table id="datatable">
				<thead>
					<tr>
						<td>{$ui.key_value}</td>
						<td>{$ui.value}</td>
						<td>{$ui.fkidioma}</td>
						<td>{$ui.actions}</td>
					</tr>
				</thead>
				
				<tbody class="scrollingContent">
				{foreach from=$tablevalues item=row}
				<tr>
					<td>{$row.key_value}</td>
					<td>{$row.valor}</td>
					<td>{$row.cod_idioma}</td>
					<td> 
						<a href="?edit={$row.key_value}&idioma={$row.cod_idioma}" style="display:inline"><img alt="edit" border="0" src="img/edit.png"/></a>
						&nbsp;
						<a href="?del={$row.key_value}&idioma={$row.cod_idioma}" style="display:inline"><img alt="delete" border="0" src="img/delete.jpg"/></a>
					</td>
				</tr>
				{/foreach}
				</tbody>
			</table>		
		</div>
		
		<script type="text/javascript">
			initTableWidget('datatable',570,450,Array('N','S','S',false));
		</script>
		
</fieldset>


{include file="layout_basic_tail.tpl"}